;input variables required; [l] [s] [k] [hs]
;outputs; [objDrive]
;
;create the hexagon
_Polygon _NumSides=6 _Mode=_Circumscribed {Units:0,0,0} {Units:[s]/2,0,0}
_SelLast
_ExtrudeCrv _Output=_Surface _BothSides=_No _Solid=_Yes _DeleteInput=_Yes _BothSides=_Yes _Direction {Units:0,0,0} {Units:0,0,[l]} {ToDocUnits:[l]}
_SelLast
{Set:[objDrive]={SelectedObjs}}
_SelNone
;
;bottom of the hexagon
_Polyline _PersistentClose=_No {Units:0,0,[k]-[hs]} _Mode=_Line {Units:0,(tan(60d)*[hs]),[k]} {Units:0,0,[k]} _Enter
_SelLast
_Revolve {Units:0,0,0} {Units:0,0,-[l]} _Output=_Surface _DeleteInput=_Yes _SplitAtTangents=_Yes _Deformable=_No 0d 360d
_SelLast
;
;combine the solids
_BooleanIntersection _DeleteInput=_Yes '_SelID [objDrive] _Enter
{Set:[objDrive]={SelectedObjs}}
_SelNone